package com.cby.assist.kits.ui;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.cby.assist.kits.Category;
import com.cby.assist.kits.OliveAssistKits;
import com.cby.assist.kits.R;

/**
 * @description: MainKitsActivity
 * @author: ChenBaoYang
 * @createDate: 2022/3/7 2:17 下午
 */
public class MainKitsActivity extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_kits);

        RecyclerView recyclerView = findViewById(R.id.recycler_view);
        recyclerView.setLayoutManager(new LinearLayoutManager(this));
        MainKitsAdapter adapter = new MainKitsAdapter(this);
        adapter.setData(OliveAssistKits.getKitList(Category.BIZ));
        recyclerView.setAdapter(adapter);
        DividerItemDecoration itemDecoration = new DividerItemDecoration(this, DividerItemDecoration.VERTICAL);
        itemDecoration.setDrawable(getResources().getDrawable(R.drawable.shape_diveder_line));
        recyclerView.addItemDecoration(itemDecoration);
    }
}
